-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat: add support to string interpolation #3138
Conversation
aeab496
to
f3a6d64
Compare
This implementation only covers string interpolation for We need to come up with a such abstraction that it will be easier later to add other sources of data, not only |
Yes, only for SecretString |
@galibey regarding the String case, I added a new method to the |
Maybe creating a new Wrapper type for String, were we could call SecretStore::resolve, EnvStore::resolve, and any other resolvers as needed? |
I meant it works with yaml string only if its Rust counterpart is Upd. My bad, only string type is required |
The |
Yes, this is a possible approach. The other one could be is to parse the config data into string, replace variables and then parse the resulting string into config type. |
Could be so, yes. |
Implemented that behavior in f6331950a1a834b32bb9bb9db0e3425c55b99a29 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!. Just a minor comment.
|
||
static SECRET_STORE: OnceCell<Box<dyn SecretStore>> = OnceCell::new(); | ||
|
||
lazy_static! { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid lazy_static. should use once_cell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
cda51fa
to
1718b20
Compare
@sehz could you take another look? |
19de5d2
to
33f6800
Compare
2fced09
to
001f5c0
Compare
@sehz please take another look |
196676c
to
f719b90
Compare
8df28cc
to
e6f9077
Compare
e6f9077
to
1d0435a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me. One minor ask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bors r+ |
Solves #3127 With this change we could use something like: ``` http: headers: - "Authorization: JWT ${{ secrets.JWT_TOKEN }}" ``` And that should be resolved as - "Authorization: JWT MYSECRET_TOKEN"
Pull request successfully merged into master. Build succeeded: |
Solves #3127
With this change we could use something like:
And that should be resolved as